package schedual;

import redis.clients.jedis.Jedis;
import utiles.JedisUtils;

public class PnSchedual implements Schedual {
    @Override
    public void push(String key, String value) {
        Jedis jedis = JedisUtils.getJedis();
        jedis.set(key,value);
        jedis.close();
    }

    @Override
    public String poll(String key) {
        Jedis jedis = JedisUtils.getJedis();
       String res = jedis.get(key);
       jedis.close();
       return  res;
    }
}
